using System;
using System.Collections.Generic;
using System.Text;

namespace Kenly.DBFramework.Reflection
{
    /// <summary>
    ///  Database factory to create instance of database interfaces.
    /// </summary>
    internal static class CommandReflectorFactory
    {
       
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dbType"></param>
        /// <returns></returns>
        public static ICommandReflector CreateInstance(DatabaseType dbType)
        {
            CommandReflector commandReflector = null;
            switch (dbType)
            {
                case DatabaseType.SqlServer: commandReflector = new SqlServerCommandReflector();
                    break;
                case DatabaseType.Oracle: commandReflector = new OracleCommandReflector();
                    break;
                case DatabaseType.Oledb: commandReflector = new OleCommandReflector();
                    break;
                default: commandReflector = new SqlServerCommandReflector();
                    break;
            }
            return commandReflector;
        }

    }
}
